/* ============ 上传区域 ============ */

.upload-wrapper {
    width: 100%;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.05);
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    margin: 0;
}

.upload-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.file-input {
    display: none;
}

/* ============ 文件列表 ============ */

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.file-item:hover {
    box-shadow: var(--shadow-sm);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.file-details {
    min-width: 0;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

/* ============ 文件状态 ============ */

.file-status {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
}

.progress-bar {
    width: 100px;
    height: 4px;
    background: var(--bg-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 30px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.status-badge.error {
    background: rgba(245, 34, 45, 0.1);
    color: #f5222d;
}

.status-badge.pending {
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
}

/* ============ 文件操作 ============ */

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-upload,
.btn-delete {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.btn-upload:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 102, 204, 0.05);
}

.btn-delete:hover {
    border-color: #f5222d;
    color: #f5222d;
    background: rgba(245, 34, 45, 0.05);
}

/* ============ 响应式 ============ */

@media (max-width: 768px) {
    .upload-area {
        padding: 30px 16px;
    }

    .upload-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .upload-title {
        font-size: 14px;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .file-info {
        width: 100%;
    }

    .file-status {
        width: 100%;
        min-width: auto;
    }

    .file-actions {
        width: 100%;
    }

    .btn-upload,
    .btn-delete {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 24px 12px;
    }

    .upload-icon {
        font-size: 32px;
    }

    .upload-title {
        font-size: 13px;
    }

    .upload-subtitle {
        font-size: 12px;
    }

    .file-name {
        font-size: 13px;
    }

    .file-size {
        font-size: 11px;
    }
}
